package exp;

import java.util.Scanner;

/**
 * 把一个文章中所有的单词反转输出
 */
public class P02RevereEverywords {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.nextLine().trim();
        String[] words = s.split("\\s+");
        for (String word : words){
            StringBuffer buffer = new StringBuffer(word);
            System.out.println(buffer.reverse()+" ");
        }
    }
}
